home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / actclndr / demo.ht_ / demo.ht
Encoding:
Text File  |  1998-04-01  |  3.3 KB  |  116 lines

  1. <HTML>
  2. <HEAD>
  3. <META NAME="GENERATOR" Content="Microsoft Developer Studio">
  4. <META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
  5. <TITLE>ActiveCalendar Demo Page - The Buster Group</TITLE>
  6. </HEAD>
  7.  
  8.  
  9. <SCRIPT LANGUAGE="VBScript">
  10. <!--
  11. '*****************************************
  12. 'Set the default dates for the controls
  13. '*****************************************
  14. Sub window_onload()
  15.     ActiveCalendar1.acDate = Date
  16.     ActiveCalendar2.acDate = DateAdd("d", 7, Date)
  17. end sub
  18.  
  19.  
  20. '*****************************************
  21. 'validate and calculate the dates
  22. '*****************************************
  23. Sub GetDuration(StartDate, EndDate)
  24.     If IsNull(StartDate) Or IsNull(EndDate) Or StartDate = "" Or EndDate = "" then
  25.         txtDuration.Value = ""
  26.     Else
  27.         StartDate = CDate(ActiveCalendar1.acDate)
  28.         EndDate = CDate(ActiveCalendar2.acDate)
  29.         txtDuration.Value = DateDiff("d", StartDate, EndDate) & " days"
  30.     end if
  31. end sub
  32.  
  33. '*****************************************
  34. 'Change Events
  35. '*****************************************
  36. Sub ActiveCalendar1_Change(newdate)
  37.     GetDuration newdate, ActiveCalendar2.acDate
  38. end sub
  39.  
  40. Sub ActiveCalendar2_Change(newDate)
  41.     GetDuration ActiveCalendar1.acDate, newdate
  42. end sub
  43.  
  44. -->
  45. </SCRIPT>
  46.  
  47. <BODY>
  48.  
  49. <OBJECT
  50.  CLASSID="CLSID:5220cb21-c88d-11cf-b347-00aa00a28331">
  51.     <PARAM NAME="LPKPath" VALUE="tsgacal.LPK">
  52. </OBJECT>
  53.  
  54. <FONT FACE="Tahoma" Size=3>
  55. <STRONG>ActiveCalendar 2.0 Demo Page<BR></STRONG>
  56. <FONT SIZE=2>
  57. <STRONG>⌐ 1997 - 1998 <a href="http://www.thebustergroup.com">The Buster Group</a>.<BR><BR></STRONG>
  58.  
  59. <TABLE WIDTH=500 BORDER=0>
  60.     <TR>
  61.         <TD COLSPAN=2><FONT SIZE=2>
  62.         Please select the start and end dates to view the duration in days.<BR><BR>
  63.         </TD>
  64.     </TR>
  65.     <TR>
  66.         <TD ALIGN=RIGHT>
  67.         <FONT SIZE=2>Start Date:</FONT>
  68.         </TD>
  69.         <TD WIDTH=225>
  70.     <OBJECT ID="ActiveCalendar1" WIDTH=120 HEIGHT=19
  71.      CLASSID="CLSID:B6845ABC-880B-11D1-A249-00805F21D5F8"
  72.      CODEBASE="TSGACAL.CAB#version=2,0,0,100">
  73.         <PARAM NAME="CalendarFont" VALUE="Tahoma">
  74.         <PARAM NAME="Font" VALUE="Tahoma">
  75.         <PARAM NAME="FontSize" VALUE="8">
  76.         <PARAM NAME="Height" VALUE="18">
  77.         <PARAM NAME="DateFormat" VALUE="ddd mm/dd/yyyy">
  78.     </OBJECT>
  79. </TD>
  80.     </TR>
  81.     <TR>
  82.         <TD ALIGN=RIGHT>
  83.             <FONT SIZE=2>End Date:</FONT>
  84.         </TD>
  85.         <TD WIDTH=225>
  86.     <OBJECT ID="ActiveCalendar2" WIDTH=120 HEIGHT=19
  87.      CLASSID="CLSID:B6845ABC-880B-11D1-A249-00805F21D5F8"
  88.      CODEBASE="TSGACAL.CAB#version=2,0,0,100">
  89.         <PARAM NAME="CalendarFont" VALUE="Tahoma">
  90.         <PARAM NAME="Font" VALUE="Tahoma">
  91.         <PARAM NAME="FontSize" VALUE="8">
  92.         <PARAM NAME="Height" VALUE="18">
  93.         <PARAM NAME="DateFormat" VALUE="ddd mm/dd/yyyy">
  94.     </OBJECT>
  95. </TD>
  96.     </TR>
  97.     <TR>
  98.         <TD ALIGN=RIGHT>
  99.             <FONT SIZE=2>Duration:</FONT>
  100.         </TD>
  101.         <TD WIDTH=225>
  102.             <BR>
  103.     <OBJECT ID="txtDuration" WIDTH=120 HEIGHT=21
  104.      CLASSID="CLSID:8BD21D10-EC42-11CE-9E0D-00AA006002F3">
  105.         <PARAM NAME="VariousPropertyBits" VALUE="746604571">
  106.         <PARAM NAME="Size" VALUE="3281;564">
  107.         <PARAM NAME="FontName" VALUE="Tahoma">
  108.         <PARAM NAME="FontHeight" VALUE="165">
  109.         <PARAM NAME="FontCharSet" VALUE="0">
  110.         <PARAM NAME="FontPitchAndFamily" VALUE="2">
  111.     </OBJECT>
  112. </TD>
  113.     </TR>
  114. </TABLE>
  115. </BODY>
  116. </HTML>